package com.ht.controller;

import com.ht.data.Result;
import com.ht.dto.TbDiagnoseOrderDTO;
import com.ht.feign.ExpertOutpatientFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController  //等于@Restquest + @Controller
@RequestMapping("/prescriptions")
@Api("快速问医生管理系统")
@RefreshScope  //实时刷新
public class PrescriptionsController {
    @Autowired
    private ExpertOutpatientFeign expertOutpatientFeign;


    /**
     *
     * @param dto status //开药门诊/6
     * @return
     */
    //TODO---测试 实体类未传
    @PostMapping("/queryCharges")
    @ApiOperation("开药门诊 5元")
    @ApiImplicitParam()
    public Result queryDepartment(TbDiagnoseOrderDTO dto){
        Result result = expertOutpatientFeign.outpatientRegistered(dto);
        return result;
    }
}
